#include "multicastsend.h"
#include "ui_multicastsend.h"

MultiCastSend::MultiCastSend(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::MultiCastSend)
{
    ui->setupUi(this);
}

MultiCastSend::~MultiCastSend()
{
    delete ui;
}

void MultiCastSend::on_sendBt_clicked()
{
    QString data = ui->textEdit->toPlainText();
    msocket.writeDatagram(data.toUtf8(), //要发送的数据
                          QHostAddress(ui->ipEdit->text()),//组播地址
                          ui->portEdit->text().toShort()); //端口号
}
